package struct
{
	import assists.LonLatChange;
	
	import xmlS.EatingResturantXMLLoader;
	
	public class Restaurant extends TourElementBase
	{	
		public function Restaurant()
		{
		}
		
		public function initThis():void
		{
			var obj:Object = this._xmlLoaderManager.eatingResturantXml.load("id",id);
			
			if(obj){
				this.id = obj.id;
				this.type = obj.type;
				this.name = obj.name;
				this.starLevel = obj.starLevel;
				this.location = obj.location;
				this.desc = obj.desc;
				this.url = obj.url;
				this.costNum = obj.costNum;
				
				LonLatChange.googleToBaidu(this);
			}
		}
		
		public function initWithData(obj:Object):void
		{
			if(obj){
				this.id = obj.id;
				this.type = obj.type;
				this.name = obj.name;
				this.starLevel = obj.starLevel;
				this.location = obj.location;
				this.desc = obj.desc; 
				this.url = obj.url;
				this.costNum = obj.costNum;
				this.picList = obj.picList;
				this.address = obj.address;
				this.phone = obj.phone;
				this.time = obj.time;
				this.traffic = obj.traffic;
				this.aroundList = obj.aroundList;
				this.website = obj.website;
				
				LonLatChange.googleToBaidu(this);
				
				this.addPropertyList("desc");
				this.addPropertyList("costNum");
				this.addPropertyList("time");
				this.addPropertyList("address","location");
				this.addPropertyList("phone");
				this.addPropertyList("traffic");
				this.addPropertyList("commentList");
				this.addPropertyList("website");
				
			}
		}
	}
}